<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>佐心，教家长做父母</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">

    <link rel="stylesheet" href="assets/css/amazeui.min.css?v=2.9">
    <link rel="stylesheet" href="assets/css/style.css?v=2.3">
    <link rel="stylesheet" href="assets/css/index.css?v=2.3">
    <script src="assets/js/myAlert.js"></script>
    <script>
    	var orderSn='${orderSn}';
    	var sex="男";
    </script>
    <script>
    	    /** 
     * 返回前一页（或关闭本页面） 
     * <li>如果没有前一页历史，则直接关闭当前页面</li> 
     */  
    function goBack(){  
        if ((navigator.userAgent.indexOf('MSIE') >= 0) && (navigator.userAgent.indexOf('Opera') < 0)){ // IE  
            if(history.length > 0){  
                window.history.go( -1 );  
            }else{  
                location.href="${ctx}/index.jsp";
            }  
        }else{ //非IE浏览器  
            if (navigator.userAgent.indexOf('Firefox') >= 0 ||  
                navigator.userAgent.indexOf('Opera') >= 0 ||  
                navigator.userAgent.indexOf('Safari') >= 0 ||  
                navigator.userAgent.indexOf('Chrome') >= 0 ||  
                navigator.userAgent.indexOf('WebKit') >= 0){  
      
                if(window.history.length > 1){  
                    window.history.go( -1 );  
                }else{  
                    location.href="${ctx}/index.jsp";
                }  
            }else{ //未知的浏览器  
                window.history.go( -1 );  
            }  
        }  
    }  
    </script>
</head>
<body class="bg-gray">
<header data-am-widget="header" class="am-header am-header-default  ">
    <div class="am-header-left am-header-nav">
        <a  onclick="goBack();"  >
            <i class="icon_8"></i>
        </a>
    </div>
    <h1 class="am-header-title">
        基本信息
    </h1>
</header>
<section class="" id="amz-main" data-tag="css-nav">
    <ul class="am-list font-14 base-info">
        <li class="am-padding-top-sm am-padding-bottom-sm am-padding-left-sm">
            <div class="box">
                <div class="width-35px prelative">
                    <i class="icon_03"></i>
                </div>
                <div class="width-75px">
                    姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名：
                </div>
                <div class="box-1">
                    <input class="font-color-15 input-1" type="text" id="customerName" placeholder="">
                </div>
            </div>
        </li>
        <li class="am-padding-top-sm am-padding-bottom-sm am-padding-left-sm">
            <div class="box">
                <div class="width-35px prelative">
                    <i class="icon_07"></i>
                </div>
                <div class="width-75px">
                    联系电话：
                </div>
                <div class="box-1">
                    <input class="font-color-15 input-1" type="tel" id="telephone" placeholder="">
                </div>
            </div>
        </li>
        <li class="am-padding-top-sm am-padding-bottom-sm am-padding-left-sm">
            <div class="box">
                <div class="width-35px prelative">
                    <i class="icon_11"></i>
                </div>
                <div class="width-75px">
                    性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别：
                </div>
                <div class="box-1 font-color-15 sex-type">
                    <span class="prelative padding-left-25"><i class="icon_6_1 cur"></i><label>男</label></span> <span
                        class="prelative am-margin-left-lg padding-left-25"><i class="icon_6_1"></i><label>女</label></span>
                </div>
            </div>
        </li>
        <li class="am-padding-top-sm am-padding-bottom-sm am-padding-left-sm">
            <div class="box">
                <div class="width-35px prelative">
                    <i class="icon_18"></i>
                </div>
                <div class="width-75px">
                    年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;龄：
                </div>

                <div class="box-1 font-color-15 sex-type am-padding-right-sm prelative">
                    <div class="selectdiv">
                        <select class="select-1" id="age">
                        
                        	<%for(int i=1;i<=110;i++){%>
                            <option><%=i%></option>
 							<%}%>
                        </select>
                    </div>
                </div>

            </div>
        </li>
        <li class="am-padding-top-sm am-padding-bottom-sm am-padding-left-sm">
            <div class="box">
                <div class="width-35px prelative">
                    <i class="icon_21"></i>
                </div>
                <div class="width-75px">
                    婚&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;姻：
                </div>
                <div class="box-1 font-color-15 sex-type am-padding-right-sm prelative">
                    <div class="selectdiv">
                        <select class="select-1" id="marr">
                            <option>未婚</option>
                            <option>已婚</option>
                            <option>离异</option>
                        </select>
                    </div>
                </div>
            </div>
        </li>
        <li class="am-padding-top-sm am-padding-bottom-sm am-padding-left-sm">
            <div class="box">
                <div class="width-35px prelative">
                    <i class="icon_23"></i>
                </div>
                <div class="width-75px">
                    孩子学龄：
                </div>
                <div class="box-1 font-color-15 sex-type am-padding-right-sm prelative">
                    <div class="selectdiv">
                        <select class="select-1" id="schoolAge">
                            <option value="1">0-3岁</option>
                            <option value="2">幼儿园 </option>
                            <option value="3">小学1年级</option>
                            <option value="4">小学2-5年级</option>
                            <option value="5">小学毕业班</option>
                            <option value="6">初中1-2年级</option>
                            <option value="7">初中毕业班</option>
                            <option value="8">高中1-2年级</option>
                            <option value="9">高中毕业班</option>
                            <option value="10">大学期间</option>
                        </select>
                    </div>
                </div>
            </div>
        </li>
    </ul>


    <div class="am-container margin-top-100">
        <div class="btn-4 word-space-2 padding-left-0" id="quedin">确定</div>
    </div>
</section>


<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/amazeui.min.js"></script>
<script src="assets/js/common.js"></script>
<script>
	$(function() {
		$("#quedin").on("click",function(){
			if(sex=="男"){
				sex="1";
			}else{
				sex="2";
			}
			var customerName=$("#customerName").val();
			if(customerName==""){
				myAlert("请输入用户姓名信息");
				return false;
			}
			var telephone=$("#telephone").val();
			if(telephone==""){
				myAlert("请输入用户联系电话");
				return false;
			}
			var reg = /^0?1[3|4|5|6|7|8][0-9]\d{8}$/;
			 if (!reg.test(telephone)) {
			      myAlert("请输入正确的手机号码");
			      return false;
			 }
			var marr=$("#marr").val();
			if(marr=="已婚"){
				marr="1";
			}else if(marr=="未婚"){
				marr="2";
			}else{
				marr="3";
			}
			var age=$("#age").val();
			var schoolAge=$("#schoolAge").val();
			location.href="gotobuPersonzl?customerName="+customerName+"&telephone="+telephone+"&orderSn="+orderSn+"&age="+age+"&sex="+sex+"&schoolAge="+schoolAge+"&marr="+marr;
		});
	});

    $(".sex-type .icon_6_1").on("click", function () {
        $(this).parent().parent().find(".icon_6_1").removeClass("cur");
        $(this).addClass("cur");
        sex=$(this).next().text();
    });
</script>
</body>
</html>